package com.manager.model;

import jakarta.persistence.Entity;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.Table;
import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.CascadeType;

@SuppressWarnings("all")
@Entity
@Table(name="tb_docker_deploy_network")
public class DockerDeployNetwork extends AllId{

    private Integer containerPort;

    private Integer hostPort;

    private DockerDeploy deploy;

    @ManyToOne
    @Cascade(CascadeType.PERSIST)
    public DockerDeploy getDeploy() {
        return deploy;
    }

    public void setDeploy(DockerDeploy deploy) {
        this.deploy = deploy;
    }

    public Integer getContainerPort() {
        return containerPort;
    }

    public void setContainerPort(Integer containerPort) {
        this.containerPort = containerPort;
    }

    public Integer getHostPort() {
        return hostPort;
    }

    public void setHostPort(Integer hostPort) {
        this.hostPort = hostPort;
    }
}
